package javase.javase01.exercise05;

import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author: Gan
 * @date 2021/4/17 0017 9:50
 * @description:
 **/
public class ButterDemo extends FilterInputStream {
    /**
     * Creates a <code>FilterInputStream</code>
     * by assigning the  argument <code>in</code>
     * to the field <code>this.in</code> so as
     * to remember it for later use.
     *
     * @param in the underlying input stream, or <code>null</code> if
     *           this instance is to be created without an underlying stream.
     */
    protected ButterDemo(InputStream in) {
        super(in);
    }

    @Override
    public int read() throws IOException {
         /*FilterInputStream fin = new FilterInputStream(".\\a.txt");*/
        int read = super.read();
        char read1 = (char) read;
        char c = Character.toLowerCase(read1);
        int c1 = c;
        return c1;
        /*while ((readDate= in.read())!=-1){
            if ((readDate > 'A' && readDate < 'Z') || (readDate > 'a' && readDate < 'z')) {
                // readDate = Integer.parseInt(String.valueOf(readDate));

            }
        }*/
    }
}
